package cn.chia.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.chia.back.dao.IManagerDAO;
import cn.chia.pojo.TblUser;
import cn.chia.service.ManagerService;
@Service
public class ManagerServiceImpl implements ManagerService {
	private IManagerDAO managerDao;
	
	@Resource(name="managerDAOImpl")
	public void setManagerDao(IManagerDAO managerDao) {
		this.managerDao = managerDao;
	}
	/*
	 * 于辉  根据管理员名、密码查找管理员
	 */
	public TblUser findByUserPass(String username, String password)
			throws Exception {
		List<?> list = managerDao.findByUserPass(username,password);
		return list.size()>0?(TblUser)list.get(0):null;
	}

}
